/*
 * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
 * following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
 * disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
 * following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of
 * the dreamlu.net developer nor the names of its contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission. Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.system.service;

import org.springblade.modules.system.entity.Version;
import org.springblade.modules.system.vo.VersionVO;

import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * 服务类
 *
 * @author BladeX
 * @since 2021-06-15
 */
public interface IVersionService {

    /**
     * 自定义分页
     *
     * @param page 分页
     * @param version 版本信息
     * @return 以页的形式返回版本数据
     */
    IPage<VersionVO> selectVersionPage(IPage<VersionVO> page, VersionVO version);

    /**
     * 列表查询
     *
     *
     * @return 返回数据列表
     */
    List<Version> listall();

    /**
     * 版本添加
     *
     *
     * @param version 版本信息
     * @return 是否新增成功
     */
    boolean addVersion(Version version);

    /**
     * 查询单条记录
     *
     *
     * @param version 版本信息
     * @return 查询到的版本信息
     */
    Version getOne(Version version);

    /**
     * 逻辑删除
     *
     *
     * @param toLongList 要删除的版本的id列表
     * @return 是否插入成功
     */
    boolean deleteByIds(List<Long> toLongList);

    /**
     * 更新
     *
     *
     * @param version 版本信息
     * @return 是否更新成功
     */
    boolean updateVersion(Version version);
}
